package com.hehua.PrototypeTwo;

import java.io.IOException;

/**
 * 深克隆客户端
 */
public class Client {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        WeeklyLog weeklyLog,new_weekLog;
        weeklyLog = new WeeklyLog(); // 初始化原型对象
        Attachment attachment = new Attachment(); //创建附件对象
        weeklyLog.setAttachment(attachment);
        new_weekLog = weeklyLog.deepClone();
        System.out.println("周报对象是否相同"+(weeklyLog == new_weekLog));
        System.out.println("附件对象是否相同"+(weeklyLog.getAttachment() == new_weekLog.getAttachment()));
    }
}
